﻿use employees
gO
------------------7----------------------------------------------------------------
SELECT 
[Dept].[City],
Count([Empl].[Id]) AS [AMOUNT]
FROM [dbo].[Dept] LEFT JOIN [dbo].[Empl] ON [Dept].[ID] = [Empl].[DeptId]
WHERE [Dept].[City] Like N'%_l_%'
GROUP BY [Dept].[City]

SELECT 
[Dept].[City], 
Count([Empl].[Id]) AS [AMOUNT]
FROM [dbo].[Dept] LEFT JOIN [dbo].[Empl] ON [Dept].[ID] = [Empl].[DeptId]
GROUP BY [Dept].[City]
HAVING [Dept].[City] Like N'%_l_%'
